package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.cloudkinto.enumType.order.outbound.OutboundOrderKind;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 出库单截单
 * </p>
 *
 * @author long
 * @since 2024-12-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_outbound_cancel")
public class OutboundCancelDo extends Model<OutboundCancelDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    /**
     * 订单类型 {@link OutboundOrderKind}
     */
    @TableField("order_kind")
    private String orderKind;

    /**
     * 出库单id
     */
    @TableField("outbound_id")
    private Long outboundId;

    @TableField("back_no")
    private String backNo;

    /**
     * 截单状态 0处理中 1已拦截 2拦截失败
     */
    @TableField("status")
    private Integer status;

    /**
     * 发起时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 完成时间
     */
    @TableField("finish_time")
    private Date finishTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
